const mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/household', { useNewUrlParser: true, useUnifiedTopology: true });
mongoose.connection.on("connected", function () {
    console.log('MongoDB is Connected');
})
mongoose.connection.on('error', console.error.bind(console, 'connection error:'));